<%-- 
    Document   : borderlayout
    Created on : 2019-1-25, 9:55:13
    Author     : dusin
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>教学助手</title>
        <script type="text/javascript" src="../../js/jquery/jquery.min.js"></script>
        <script type="text/javascript" src="../../js/jquery/jquery.easyui.min.js"></script>
        <link rel="stylesheet" href="../../js/jquery/themes/default/easyui.css" type="text/css" />
        <link rel="stylesheet" href="../../js/jquery/themes/icon.css" type="text/css" />
        <script language="JavaScript">
            $(document).ready(function() {
               
               
            });
             function onSelectCourse(rec){
                    $.ajax({url:"../../servlet/student/SelectClass",
                        data:{id:rec.id,name:rec.text,teacherNo:rec.teacherNo},
                        dataType:"text",
                        success:function(result){                         
                            var src = document.getElementById("mainFrame").contentWindow.location.href;
                            //$('#mainFrame').attr('src', $('#mainFrame').attr('src'));
                            $('#mainFrame').attr('src', src);
                            $.messager.show({ title:'提示', msg:'您选择了课程'+rec.text, timeout:5000, showType:'slide'});
                        },
                        error:function(result){
                            $.messager.show({ title:'提示', msg:'课程选择失败，请稍后再试'+rec.text, timeout:5000, showType:'slide'});
                        }
                    });                   
                }
        </script>
        <style>
            .footer {
                width: 100%;
                text-align: center;
                line-height: 35px;
            }
            .top-bg {
                background-color: #d8e4fe;
                height: 80px;

            }
        </style>
    </head>
    <body class="easyui-layout">
        <div region="north" border="true" split="true" style="overflow: hidden; height: 80px;">
            <div class="top-bg"><img src="../../img/icon/logo_72.png"/>
                <div style="float:right;font:normal 16px tahoma, arial, sans-serif, 宋体;margin:30px 30px 0 10px;z-index:1000">                       
                    <img src="../../img/icon/user.png" width="16" height="16" />&nbsp;<span>${studentNo}&nbsp;${studentName}</span>&nbsp;|&nbsp; 
                    <img src="../../img/icon/sign_out.png" width="16" height="16" /><a href="logout.jsp?type=2" style="color:blue"> 注销</a>
                </div>            
            </div>

        </div>
        <div region="south" border="true" split="true" style="overflow: hidden; height: 40px;">
            <div class="footer">版权所有：<a href="http://www.dusin.com">JUST工作室</a></div>
        </div>
        <div region="west" split="true"  style="width: 250px;">
            <div class="easyui-layout" data-options="fit:true">
                <div region="north" style="height:210px">
                    <div id="p" class="easyui-panel" title="选择课程"
                         style="width:199px;height:100px;padding:10px;background:#fafafa;"
                         data-options="closable:false,fit:true,
                         collapsible:false,minimizable:false,maximizable:false">
                       <input id="cc" class="easyui-combobox" name="course"   
                              data-options="valueField:'id',textField:'text',
                              url:'../../servlet/student/CurrentClass',
                              onLoadSuccess:function(){
                                var options = $(this).combobox('getData');
                                $(this).combobox('select', options[0].id);
                              },
                              onSelect: function(rec){
                                  onSelectCourse(rec);
                              }"
                        />
                    </div>
                </div>
                <div region ="center">
                    <div id="pmenu" class="easyui-panel" title="菜单"
                         style="padding:10px;background:#fafafa;"
                         data-options="closable:false,fit:true,
                        collapsible:false,minimizable:false,maximizable:false">
                             <a href="../student/lab.jsp" target='mainFrame' style="width:170px" class="easyui-linkbutton" plain="true" iconCls="icon-computer">实验</a><br/>
                             <a href="../student/homework.jsp" target='mainFrame' style="width:170px" class="easyui-linkbutton" plain="true" iconCls="icon-homework16">作业</a><br/>
                             <a href="../student/attendance.jsp" target='mainFrame' style="width:170px" class="easyui-linkbutton" plain="true" iconCls="icon-ok">考勤</a><br/>
                             <a href="../student/setting.jsp" target='mainFrame' style="width:170px" class="easyui-linkbutton" plain="true" iconCls="icon-settings16">设置</a><br/>
                    </div>
                    
                </div>
            </div>
        </div>
        <div id="mainPanle" region="center" style="overflow: hidden;">
            <iframe id="mainFrame" name="mainFrame" scrolling="auto" frameborder="0" src="../student/lab.jsp" style="width:100%;height:100%;"></iframe>
        </div>
    </body>
</html>
